<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
* Menu Template Function
*
* Displays a menu in CSS-ready HTML
*
* @param string $name The menu name
* @param string $class CSS class(es) for the menu <ul> element
* @param string $id Element ID for the menu <ul> element
* @param string $show_sub_menus Either "no|yes|active".  "active" only displays the sub menu if it's parent menu
*								item is active, or a sibling is active
*
*
* @return string $menu
*
*/
function smarty_function_menu ($params, $smarty) {
	$smarty->CI->load->library('menu');
	$html = '';
	if($params['type'] == 'main'){
		$smarty->CI->menu->parent_link('trang-chu','Trang Chủ', site_url());
		$smarty->CI->menu->parent_link('dish','Món Ngon', create_url('dish'));
		$smarty->CI->menu->parent_link('quan-ngon','Quán Ngon', null);
		$smarty->CI->menu->parent_link('lien-he','Liên Hệ', null);
		$html = $smarty->CI->menu->display();
	return $html;
	}
}